﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Core;
using System.Collections;

namespace Yuanlin.Business
{
    public class SpecialNewsRequest : TEntityRequest<SpecialNews>
    {
        public SpecialNewsRequest()
        {
            int? entityId = GetParameterValue<int?>(YuanlinParameterName.SpecialNewsId);
            if (entityId.HasValue)
            {
                EntityId = entityId.Value;
            }
        }
    }
    public class SpecialNewsListRequest : TEntityListRequest<SpecialNews>
    {
        private  int? province = GetParameterValue<int?>(YuanlinParameterName.Province);
        private int? city = GetParameterValue<int?>(YuanlinParameterName.City);
        private int? town = GetParameterValue<int?>(YuanlinParameterName.Town);
        private int? smallTown = GetParameterValue<int?>(YuanlinParameterName.SmallTown);
        private string title = GetParameterValue<string>(YuanlinParameterName.Title);
        private int? categoryId = GetParameterValue<int?>(YuanlinParameterName.CategoryId);
        private int? categoryType = GetParameterValue<int?>(YuanlinParameterName.CategoryType);
        private int? kind = GetParameterValue<int?>(YuanlinParameterName.Kind);

        public int? Province
        {
            get
            {
                return province;
            }
            set
            {
                province = value;
            }
        }
        public int? City
        {
            get
            {
                return city;
            }
            set
            {
                city = value;
            }
        }
        public int? Town
        {
            get
            {
                return town;
            }
            set
            {
                town = value;
            }
        }
        public int? SmallTown
        {
            get
            {
                return smallTown;
            }
            set
            {
                smallTown = value;
            }
        }
        public string Title
        {
            get
            {
                if (!string.IsNullOrEmpty(title))
                {
                    return string.Format("%{0}%", title);
                }
                return "";
            }
            set
            {
                title = value;
            }
        }
        public int? CategoryId
        {
            get
            {
                return categoryId;
            }
            set
            {
                categoryId = value;
            }
        }
        public int? CategoryType
        {
            get
            {
                return categoryType;
            }
            set
            {
                categoryType = value;
            }
        }
        public int? Kind
        {
            get
            {
                return kind;
            }
            set
            {
                kind = value;
            }
        }
    }
    public class SpecialNewsReply : EntityReply
    {
    }
}